27/01/2021

Web Scraping Examples in R

What? Why? How?

What? Why? How?

What?
Web Scraping = Web data extraction

Why?
To gather (scrap) data from the internet if:

  • data cannot be downloaded directly;
  • data are generated instantly (based on user’s preference for example)

How?
Let’s try (basic example)

Web Pages: the HTML language

HTML is behind everything on the web.

Briefly understand syntax rules, browser presentation, tags and attributes to parse HTML and scrape the web for the information we need.

  • A webpage is NOT an HTML document. Basically, an HTML document can be opened using a text editor.

  • The HTML code tells a browser how to show a webpage (what goes into a headline, what goes into a text, etc.). We need to BRIEFLY understand the underlying marked up structure to understand how to scrape it.

Web Pages: the HTML language

Example here with Lancaster University website:

HTML elements and tags

Each of those TAGS have their own unique property:
- title tag helps a browser render the title of a web page
- body tag defines the body of an HTML document

All you need to keep in mind is that a webpage is structured with the help of HTML tags, and identifying these tags can help you locate and extract the information easily!

Scraping information from Wikipedia using R

Quick rvest tutorial

Quick rvest tutorial

There are several steps involved in using rvest which are conceptually quite straightforward:

  • Identify a URL to be examined for content
  • Inspect the HTML code to identify the “selector”. This will be a paragraph, table, hyper links, images, etc.
  • Load rvest
  • Use read_html to “read” the URL
  • Pass the result to html_nodes to get the selectors identified in step number 2
  • Get the text or table content

Steps 1 & 2

# Step 1 - Grab the url
url <- "https://en.wikipedia.org/wiki/Rankings_of_universities_in_the_United_Kingdom"

# Step 2 - Inspect the HTML code

Steps 3 & 4

# Step 3 - Load rvest library

library(rvest)
url <- "https://en.wikipedia.org/wiki/Rankings_of_universities_in_the_United_Kingdom"

# Step 4 - Read the html code

html <- read_html(url)
html
## {html_document}
## <html class="client-nojs" lang="en" dir="ltr">
## [1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 ...
## [2] <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject  ...

Step 5

Get some other types of HTML objects with appropriate TAGS

Let’s get the paragraphs

# Identify text paragraphs with tag 'p'
paragraphs <- read_html(url) %>% 
              html_nodes("p")

# Then we might want to actually parse out those paragraphs into text:
paragraphs <- read_html(url) %>% 
              html_nodes("p") %>% 
              html_text()
paragraphs[1:3]
## [1] "\n\nThree national rankings of universities in the United Kingdom are published annually – by The Complete University Guide, The Guardian and jointly by The Times and The Sunday Times. Rankings have also been produced in the past by The Daily Telegraph and Financial Times.\n"                                                                                                                                                                              
## [2] "The primary aim of the rankings is to inform potential undergraduate applicants about UK universities based on a range of criteria, including entry standards, student satisfaction, staff/student ratio, academic services and facilities expenditure per student, research quality, proportion of Firsts and 2:1s, completion rates and student destinations.[1][2] All of the league tables also rank universities on their strength in individual subjects.\n"
## [3] "Each year since 2008, Times Higher Education has compiled a \"Table of Tables\" to combine the results of the 3 mainstream league tables. In the 2021 table, the top 5 universities were the University of Cambridge and the University of Oxford (joint first), the University of St Andrews, the London School of Economics and Durham University.[3]"

Step 5

Let’s get the hyperlinks to other pages

# Extract the URLs
url_ <- read_html(url) %>%
        html_nodes("a") %>%
        html_attr("href")
url_
##   [1] NA                                                                                                                                                                                    
##   [2] "#mw-head"                                                                                                                                                                            
##   [3] "#searchInput"                                                                                                                                                                        
##   [4] "/wiki/The_Guardian"                                                                                                                                                                  
##   [5] "/wiki/The_Times"                                                                                                                                                                     
##   [6] "/wiki/The_Sunday_Times"                                                                                                                                                              
##   [7] "#cite_note-Guardian_Methodology-1"                                                                                                                                                   
##   [8] "#cite_note-2"                                                                                                                                                                        
##   [9] "/wiki/Times_Higher_Education"                                                                                                                                                        
##  [10] "/wiki/University_of_Cambridge"                                                                                                                                                       
##  [11] "/wiki/University_of_Oxford"                                                                                                                                                          
##  [12] "/wiki/University_of_St_Andrews"                                                                                                                                                      
##  [13] "/wiki/London_School_of_Economics"                                                                                                                                                    
##  [14] "/wiki/Durham_University"                                                                                                                                                             
##  [15] "#cite_note-THE_ToT_2021-3"                                                                                                                                                           
##  [16] "#Rankings"                                                                                                                                                                           
##  [17] "#The_Complete_University_Guide"                                                                                                                                                      
##  [18] "#The_Guardian"                                                                                                                                                                       
##  [19] "#The_Times/The_Sunday_Times"                                                                                                                                                         
##  [20] "#Summary_of_national_rankings"                                                                                                                                                       
##  [21] "#Disparity_with_global_rankings"                                                                                                                                                     
##  [22] "#British_universities_in_global_rankings"                                                                                                                                            
##  [23] "#Criticism"                                                                                                                                                                          
##  [24] "#Accuracy_and_neutrality"                                                                                                                                                            
##  [25] "#Full-time_bias"                                                                                                                                                                     
##  [26] "#References"                                                                                                                                                                         
##  [27] "#External_links"                                                                                                                                                                     
##  [28] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=1"                                                                                             
##  [29] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=2"                                                                                             
##  [30] "#cite_note-4"                                                                                                                                                                        
##  [31] "/wiki/Z-score"                                                                                                                                                                       
##  [32] "#cite_note-5"                                                                                                                                                                        
##  [33] "#cite_note-6"                                                                                                                                                                        
##  [34] "/wiki/Higher_Education_Statistics_Agency"                                                                                                                                            
##  [35] "/wiki/UCAS"                                                                                                                                                                          
##  [36] "/wiki/Research_Excellence_Framework"                                                                                                                                                 
##  [37] "/wiki/National_Student_Survey"                                                                                                                                                       
##  [38] "#cite_note-CUG_2021-7"                                                                                                                                                               
##  [39] "/wiki/University_of_Cambridge"                                                                                                                                                       
##  [40] "/wiki/University_of_Warwick"                                                                                                                                                         
##  [41] "/wiki/University_of_Nottingham"                                                                                                                                                      
##  [42] "/wiki/University_of_Dundee"                                                                                                                                                          
##  [43] "/wiki/University_of_Essex"                                                                                                                                                           
##  [44] "/wiki/University_of_Oxford"                                                                                                                                                          
##  [45] "/wiki/University_of_Exeter"                                                                                                                                                          
##  [46] "/wiki/University_of_York"                                                                                                                                                            
##  [47] "/wiki/Swansea_University"                                                                                                                                                            
##  [48] "/wiki/Harper_Adams_University"                                                                                                                                                       
##  [49] "/wiki/University_of_St_Andrews"                                                                                                                                                      
##  [50] "/wiki/University_of_Birmingham"                                                                                                                                                      
##  [51] "/wiki/Newcastle_University"                                                                                                                                                          
##  [52] "/wiki/University_of_Liverpool"                                                                                                                                                       
##  [53] "/wiki/Aston_University"                                                                                                                                                              
##  [54] "/wiki/London_School_of_Economics_and_Political_Science"                                                                                                                              
##  [55] "/wiki/University_of_Bristol"                                                                                                                                                         
##  [56] "/wiki/Royal_Holloway,_University_of_London"                                                                                                                                          
##  [57] "/wiki/University_of_Surrey"                                                                                                                                                          
##  [58] "/wiki/University_for_the_Creative_Arts"                                                                                                                                              
##  [59] "/wiki/Imperial_College_London"                                                                                                                                                       
##  [60] "/wiki/University_of_Edinburgh"                                                                                                                                                       
##  [61] "/wiki/University_of_East_Anglia"                                                                                                                                                     
##  [62] "/wiki/Queen_Mary,_University_of_London"                                                                                                                                              
##  [63] "/wiki/University_of_Stirling"                                                                                                                                                        
##  [64] "/wiki/Loughborough_University"                                                                                                                                                       
##  [65] "/wiki/University_of_Leeds"                                                                                                                                                           
##  [66] "/wiki/University_of_Aberdeen"                                                                                                                                                        
##  [67] "/wiki/University_of_Strathclyde"                                                                                                                                                     
##  [68] "/wiki/Nottingham_Trent_University"                                                                                                                                                   
##  [69] "/wiki/Durham_University"                                                                                                                                                             
##  [70] "/wiki/University_of_Manchester"                                                                                                                                                      
##  [71] "/wiki/Queen%27s_University_Belfast"                                                                                                                                                  
##  [72] "/wiki/SOAS,_University_of_London"                                                                                                                                                    
##  [73] "/wiki/University_of_Kent"                                                                                                                                                            
##  [74] "/wiki/Lancaster_University"                                                                                                                                                          
##  [75] "/wiki/University_of_Southampton"                                                                                                                                                     
##  [76] "/wiki/University_of_Sheffield"                                                                                                                                                       
##  [77] "/wiki/University_of_Leicester"                                                                                                                                                       
##  [78] "/wiki/Arts_University_Bournemouth"                                                                                                                                                   
##  [79] "/wiki/University_of_Bath"                                                                                                                                                            
##  [80] "/wiki/University_of_Glasgow"                                                                                                                                                         
##  [81] "/wiki/Heriot-Watt_University"                                                                                                                                                        
##  [82] "/wiki/University_of_Reading"                                                                                                                                                         
##  [83] "/wiki/Oxford_Brookes_University"                                                                                                                                                     
##  [84] "/wiki/University_College_London"                                                                                                                                                     
##  [85] "/wiki/King%27s_College_London"                                                                                                                                                       
##  [86] "/wiki/Cardiff_University"                                                                                                                                                            
##  [87] "/wiki/University_of_Sussex"                                                                                                                                                          
##  [88] "/wiki/University_of_Lincoln"                                                                                                                                                         
##  [89] "#cite_note-8"                                                                                                                                                                        
##  [90] "#cite_note-9"                                                                                                                                                                        
##  [91] "/wiki/University_of_Cambridge"                                                                                                                                                       
##  [92] "/wiki/University_of_Oxford"                                                                                                                                                          
##  [93] "/wiki/Imperial_College_London"                                                                                                                                                       
##  [94] "/wiki/Durham_University"                                                                                                                                                             
##  [95] "/wiki/University_of_St_Andrews"                                                                                                                                                      
##  [96] "/wiki/London_School_of_Economics"                                                                                                                                                    
##  [97] "/wiki/University_of_Exeter"                                                                                                                                                          
##  [98] "/wiki/University_of_Bath"                                                                                                                                                            
##  [99] "/wiki/University_College_London"                                                                                                                                                     
## [100] "/wiki/Royal_Veterinary_College"                                                                                                                                                      
## [101] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=3"                                                                                             
## [102] "#cite_note-10"                                                                                                                                                                       
## [103] "/wiki/Sophisticated"                                                                                                                                                                 
## [104] "#cite_note-Guardian_Methodology-1"                                                                                                                                                   
## [105] "#cite_note-11"                                                                                                                                                                       
## [106] "/wiki/Destination_of_Leavers_from_Higher_Education"                                                                                                                                  
## [107] "#cite_note-Guardian_2021-12"                                                                                                                                                         
## [108] "/wiki/University_of_Oxford"                                                                                                                                                          
## [109] "/wiki/University_of_Bristol"                                                                                                                                                         
## [110] "/wiki/University_of_the_West_of_England,_Bristol"                                                                                                                                    
## [111] "/wiki/University_of_Sheffield"                                                                                                                                                       
## [112] "/wiki/Nottingham_Trent_University"                                                                                                                                                   
## [113] "/wiki/University_of_St_Andrews"                                                                                                                                                      
## [114] "/wiki/University_of_Glasgow"                                                                                                                                                         
## [115] "/wiki/University_of_Birmingham"                                                                                                                                                      
## [116] "/wiki/Royal_Holloway,_University_of_London"                                                                                                                                          
## [117] "/wiki/King%27s_College_London"                                                                                                                                                       
## [118] "/wiki/University_of_Cambridge"                                                                                                                                                       
## [119] "/wiki/University_of_Edinburgh"                                                                                                                                                       
## [120] "/wiki/University_of_Southampton"                                                                                                                                                     
## [121] "/wiki/University_for_the_Creative_Arts"                                                                                                                                              
## [122] "/wiki/Robert_Gordon_University"                                                                                                                                                      
## [123] "/wiki/Durham_University"                                                                                                                                                             
## [124] "/wiki/University_College_London"                                                                                                                                                     
## [125] "/wiki/Swansea_University"                                                                                                                                                            
## [126] "/wiki/University_of_West_London"                                                                                                                                                     
## [127] "/wiki/Oxford_Brookes_University"                                                                                                                                                     
## [128] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [129] "/wiki/Strathclyde_University"                                                                                                                                                        
## [130] "/wiki/University_of_Manchester"                                                                                                                                                      
## [131] "/wiki/Heriot-Watt_University"                                                                                                                                                        
## [132] "/wiki/University_of_the_Arts_London"                                                                                                                                                 
## [133] "/wiki/University_of_Bath"                                                                                                                                                            
## [134] "/wiki/University_of_York"                                                                                                                                                            
## [135] "/wiki/Coventry_University"                                                                                                                                                           
## [136] "/wiki/University_of_Keele"                                                                                                                                                           
## [137] "/wiki/Queen%27s_University_Belfast"                                                                                                                                                  
## [138] "/wiki/Loughborough_University"                                                                                                                                                       
## [139] "/wiki/University_of_Exeter"                                                                                                                                                          
## [140] "/wiki/Northumbria_University"                                                                                                                                                        
## [141] "/wiki/Cardiff_University"                                                                                                                                                            
## [142] "/wiki/Sheffield_Hallam_University"                                                                                                                                                   
## [143] "/wiki/University_of_Warwick"                                                                                                                                                         
## [144] "/wiki/University_of_Leeds"                                                                                                                                                           
## [145] "/wiki/University_of_Stirling"                                                                                                                                                        
## [146] "/wiki/University_of_Nottingham"                                                                                                                                                      
## [147] "/wiki/University_of_Abertay_Dundee"                                                                                                                                                  
## [148] "/wiki/Imperial_College_London"                                                                                                                                                       
## [149] "/wiki/University_of_Dundee"                                                                                                                                                          
## [150] "/wiki/University_of_Chichester"                                                                                                                                                      
## [151] "/wiki/University_of_East_Anglia"                                                                                                                                                     
## [152] "/wiki/University_of_Aberystwyth"                                                                                                                                                     
## [153] "/wiki/Lancaster_University"                                                                                                                                                          
## [154] "/wiki/University_of_Aberdeen"                                                                                                                                                        
## [155] "/wiki/Aston_University"                                                                                                                                                              
## [156] "/wiki/Kingston_University"                                                                                                                                                           
## [157] "/wiki/Bolton_University"                                                                                                                                                             
## [158] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=4"                                                                                             
## [159] "#cite_note-13"                                                                                                                                                                       
## [160] "#cite_note-14"                                                                                                                                                                       
## [161] "/wiki/Quality_Assurance_Agency"                                                                                                                                                      
## [162] "/wiki/Scottish_Higher_Education_Funding_Council"                                                                                                                                     
## [163] "/wiki/Higher_Education_Funding_Council_for_Wales"                                                                                                                                    
## [164] "/wiki/Higher_Education_Funding_Council_for_England"                                                                                                                                  
## [165] "/wiki/Destination_of_Leavers_from_Higher_Education"                                                                                                                                  
## [166] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=5"                                                                                             
## [167] "#cite_note-15"                                                                                                                                                                       
## [168] "/wiki/Times_Higher_Education"                                                                                                                                                        
## [169] "#cite_note-THE_ToT_2021-3"                                                                                                                                                           
## [170] "#cite_note-THE_ToT_2021-3"                                                                                                                                                           
## [171] "/wiki/Rankings_of_universities_in_the_United_Kingdom#The_Complete_University_Guide"                                                                                                  
## [172] "#cite_note-CUG_2021-7"                                                                                                                                                               
## [173] "/wiki/Rankings_of_universities_in_the_United_Kingdom#The_Guardian"                                                                                                                   
## [174] "#cite_note-Guardian_2021-12"                                                                                                                                                         
## [175] "#cite_note-16"                                                                                                                                                                       
## [176] "/wiki/University_of_Cambridge"                                                                                                                                                       
## [177] "/wiki/University_of_Oxford"                                                                                                                                                          
## [178] "/wiki/University_of_St_Andrews"                                                                                                                                                      
## [179] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [180] "/wiki/Durham_University"                                                                                                                                                             
## [181] "/wiki/Imperial_College_London"                                                                                                                                                       
## [182] "/wiki/Loughborough_University"                                                                                                                                                       
## [183] "/wiki/University_of_Bath"                                                                                                                                                            
## [184] "/wiki/Lancaster_University"                                                                                                                                                          
## [185] "/wiki/University_of_Warwick"                                                                                                                                                         
## [186] "/wiki/University_College_London"                                                                                                                                                     
## [187] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=6"                                                                                             
## [188] "/wiki/University_of_St_Andrews"                                                                                                                                                      
## [189] "/wiki/Durham_University"                                                                                                                                                             
## [190] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [191] "/wiki/US_News_%26_World_Report"                                                                                                                                                      
## [192] "/wiki/QS_World_University_Rankings"                                                                                                                                                  
## [193] "/wiki/Times_Higher_Education_World_University_Rankings"                                                                                                                              
## [194] "/wiki/University_of_Manchester"                                                                                                                                                      
## [195] "/wiki/University_of_Edinburgh"                                                                                                                                                       
## [196] "/wiki/King%27s_College_London"                                                                                                                                                       
## [197] "#cite_note-17"                                                                                                                                                                       
## [198] "/wiki/College_and_university_rankings#International_rankings_from_regional_organizations"                                                                                            
## [199] "/wiki/Academic_Ranking_of_World_Universities"                                                                                                                                        
## [200] "/wiki/QS_World_University_Rankings"                                                                                                                                                  
## [201] "/wiki/Times_Higher_Education_World_University_Rankings"                                                                                                                              
## [202] "#cite_note-18"                                                                                                                                                                       
## [203] "#cite_note-19"                                                                                                                                                                       
## [204] "#cite_note-20"                                                                                                                                                                       
## [205] "/wiki/%C3%89cole_Normale_Sup%C3%A9rieure"                                                                                                                                            
## [206] "/wiki/Brown_University"                                                                                                                                                              
## [207] "/wiki/Quacquarelli_Symonds"                                                                                                                                                          
## [208] "#cite_note-21"                                                                                                                                                                       
## [209] "#cite_note-Guardian_Methodology-1"                                                                                                                                                   
## [210] "#cite_note-22"                                                                                                                                                                       
## [211] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [212] "#cite_note-23"                                                                                                                                                                       
## [213] "#cite_note-24"                                                                                                                                                                       
## [214] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=7"                                                                                             
## [215] "#cite_note-25"                                                                                                                                                                       
## [216] "/wiki/College_and_university_rankings"                                                                                                                                               
## [217] "/wiki/QS_World_University_Rankings"                                                                                                                                                  
## [218] "#cite_note-QS_World_University_Rankings_2020-26"                                                                                                                                     
## [219] "/wiki/Times_Higher_Education_World_University_Rankings"                                                                                                                              
## [220] "#cite_note-27"                                                                                                                                                                       
## [221] "/wiki/Academic_Ranking_of_World_Universities"                                                                                                                                        
## [222] "#cite_note-ARWU_2019-28"                                                                                                                                                             
## [223] "/wiki/CWTS_Leiden_Ranking"                                                                                                                                                           
## [224] "#cite_note-CWTS_Leiden_Ranking-29"                                                                                                                                                   
## [225] "/wiki/University_of_Oxford"                                                                                                                                                          
## [226] "/wiki/University_of_Cambridge"                                                                                                                                                       
## [227] "/wiki/Imperial_College_London"                                                                                                                                                       
## [228] "/wiki/University_College_London"                                                                                                                                                     
## [229] "/wiki/University_of_Edinburgh"                                                                                                                                                       
## [230] "/wiki/University_of_Manchester"                                                                                                                                                      
## [231] "/wiki/King%27s_College_London"                                                                                                                                                       
## [232] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [233] "/wiki/University_of_Bristol"                                                                                                                                                         
## [234] "/wiki/University_of_Warwick"                                                                                                                                                         
## [235] "/wiki/University_of_Glasgow"                                                                                                                                                         
## [236] "/wiki/Durham_University"                                                                                                                                                             
## [237] "/wiki/University_of_Birmingham"                                                                                                                                                      
## [238] "/wiki/University_of_Leeds"                                                                                                                                                           
## [239] "/wiki/University_of_Sheffield"                                                                                                                                                       
## [240] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=8"                                                                                             
## [241] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=9"                                                                                             
## [242] "/wiki/University_of_Leeds"                                                                                                                                                           
## [243] "#cite_note-autogenerated2-30"                                                                                                                                                        
## [244] "#cite_note-autogenerated2-30"                                                                                                                                                        
## [245] "#cite_note-31"                                                                                                                                                                       
## [246] "/wiki/The_Guardian"                                                                                                                                                                  
## [247] "#cite_note-32"                                                                                                                                                                       
## [248] "/wiki/Southampton_Solent_University"                                                                                                                                                 
## [249] "#cite_note-33"                                                                                                                                                                       
## [250] "/wiki/Grade_inflation"                                                                                                                                                               
## [251] "#cite_note-34"                                                                                                                                                                       
## [252] "/wiki/Institute_of_Education"                                                                                                                                                        
## [253] "/wiki/Oxford_University"                                                                                                                                                             
## [254] "#cite_note-35"                                                                                                                                                                       
## [255] "#cite_note-36"                                                                                                                                                                       
## [256] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=10"                                                                                            
## [257] "/wiki/Birkbeck,_University_of_London"                                                                                                                                                
## [258] "/wiki/Open_University"                                                                                                                                                               
## [259] "/wiki/Research_Assessment_Exercise"                                                                                                                                                  
## [260] "/wiki/Times_Higher_Education"                                                                                                                                                        
## [261] "/wiki/Birkbeck,_University_of_London"                                                                                                                                                
## [262] "/wiki/Open_University"                                                                                                                                                               
## [263] "#cite_note-37"                                                                                                                                                                       
## [264] "/wiki/Open_University"                                                                                                                                                               
## [265] "/wiki/Birkbeck,_University_of_London"                                                                                                                                                
## [266] "#cite_note-38"                                                                                                                                                                       
## [267] "#cite_note-39"                                                                                                                                                                       
## [268] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=11"                                                                                            
## [269] "#cite_ref-Guardian_Methodology_1-0"                                                                                                                                                  
## [270] "#cite_ref-Guardian_Methodology_1-1"                                                                                                                                                  
## [271] "#cite_ref-Guardian_Methodology_1-2"                                                                                                                                                  
## [272] "http://image.guardian.co.uk/sys-files/Guardian/documents/2010/06/09/DetailedMethodology2010.pdf"                                                                                     
## [273] "https://web.archive.org/web/20100705000424/http://image.guardian.co.uk/sys-files/Guardian/documents/2010/06/09/DetailedMethodology2010.pdf"                                          
## [274] "#cite_ref-2"                                                                                                                                                                         
## [275] "http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                                                                     
## [276] "https://web.archive.org/web/20100824171633/http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                          
## [277] "#cite_ref-THE_ToT_2021_3-0"                                                                                                                                                          
## [278] "#cite_ref-THE_ToT_2021_3-1"                                                                                                                                                          
## [279] "#cite_ref-THE_ToT_2021_3-2"                                                                                                                                                          
## [280] "https://www.timeshighereducation.com/news/table-tables-2021-scottish-universities-make-gains"                                                                                        
## [281] "#cite_ref-4"                                                                                                                                                                         
## [282] "http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                                                                     
## [283] "https://web.archive.org/web/20110207235516/http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                          
## [284] "#cite_ref-5"                                                                                                                                                                         
## [285] "https://web.archive.org/web/20100818180349/http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8805"                                                                          
## [286] "http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8805"                                                                                                                     
## [287] "#cite_ref-6"                                                                                                                                                                         
## [288] "https://www.thecompleteuniversityguide.co.uk/league-tables/university-and-subject-league-tables-methodology"                                                                         
## [289] "#cite_ref-CUG_2021_7-0"                                                                                                                                                              
## [290] "#cite_ref-CUG_2021_7-1"                                                                                                                                                              
## [291] "https://www.thecompleteuniversityguide.co.uk/league-tables/rankings"                                                                                                                 
## [292] "/wiki/The_Complete_University_Guide"                                                                                                                                                 
## [293] "#cite_ref-8"                                                                                                                                                                         
## [294] "https://www.thecompleteuniversityguide.co.uk/league-tables/rankings"                                                                                                                 
## [295] "#cite_ref-9"                                                                                                                                                                         
## [296] "https://www.thecompleteuniversityguide.co.uk/league-tables/who-ranks-top-of-the-tables-by-subject-2020/"                                                                             
## [297] "#cite_ref-10"                                                                                                                                                                        
## [298] "http://education.guardian.co.uk/universityguide2008/story/0,,2068805,00.html"                                                                                                        
## [299] "https://web.archive.org/web/20080821153820/http://education.guardian.co.uk/universityguide2008/story/0,,2068805,00.html"                                                             
## [300] "#cite_ref-11"                                                                                                                                                                        
## [301] "https://www.theguardian.com/education/2019/jun/07/methodology-behind-the-guardian-university-guide-2020"                                                                             
## [302] "#cite_ref-Guardian_2021_12-0"                                                                                                                                                        
## [303] "#cite_ref-Guardian_2021_12-1"                                                                                                                                                        
## [304] "https://www.theguardian.com/education/ng-interactive/2020/sep/05/the-best-uk-universities-2021-league-table"                                                                         
## [305] "#cite_ref-13"                                                                                                                                                                        
## [306] "https://www.thetimes.co.uk/"                                                                                                                                                         
## [307] "#cite_ref-14"                                                                                                                                                                        
## [308] "https://web.archive.org/web/20110716135415/http://www.timesonline.co.uk/tol/life_and_style/education/sunday_times_university_guide/article2497779.ece"                               
## [309] "http://www.timesonline.co.uk/tol/life_and_style/education/sunday_times_university_guide/article2497779.ece"                                                                          
## [310] "#cite_ref-15"                                                                                                                                                                        
## [311] "#cite_ref-16"                                                                                                                                                                        
## [312] "https://www.thetimes.co.uk/article/good-university-guide-in-full-tp6dzs7wn"                                                                                                          
## [313] "#cite_ref-17"                                                                                                                                                                        
## [314] "https://web.archive.org/web/20110716154856/http://www.timesonline.co.uk/tol/life_and_style/education/sunday_times_university_guide/article6866395.ece"                               
## [315] "http://www.timesonline.co.uk/tol/life_and_style/education/sunday_times_university_guide/article6866395.ece"                                                                          
## [316] "#cite_ref-18"                                                                                                                                                                        
## [317] "https://web.archive.org/web/20130130215326/http://www.arwu.org/aboutARWU.jsp"                                                                                                        
## [318] "http://www.arwu.org/aboutARWU.jsp"                                                                                                                                                   
## [319] "#cite_ref-19"                                                                                                                                                                        
## [320] "https://web.archive.org/web/20100916195320/http://www.topuniversities.com/university-rankings/world-university-rankings/home"                                                        
## [321] "http://www.topuniversities.com/university-rankings/world-university-rankings/home"                                                                                                   
## [322] "#cite_ref-20"                                                                                                                                                                        
## [323] "http://www.timeshighereducation.co.uk/story.asp?sectioncode=26&storycode=413382&c=1"                                                                                                 
## [324] "https://web.archive.org/web/20100911075145/http://www.timeshighereducation.co.uk/story.asp?sectioncode=26&storycode=413382&c=1"                                                      
## [325] "#cite_ref-21"                                                                                                                                                                        
## [326] "http://www.iu.qs.com/university-rankings/world-university-rankings/"                                                                                                                 
## [327] "https://web.archive.org/web/20160106140149/http://www.iu.qs.com/university-rankings/world-university-rankings/"                                                                      
## [328] "#cite_ref-22"                                                                                                                                                                        
## [329] "http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                                                                     
## [330] "https://web.archive.org/web/20100824171633/http://www.thecompleteuniversityguide.co.uk/single.htm?ipg=8728"                                                                          
## [331] "#cite_ref-23"                                                                                                                                                                        
## [332] "http://www.lse.ac.uk/aboutLSE/leagueTables/LSEinUniversityLeagueTables.aspx"                                                                                                         
## [333] "https://web.archive.org/web/20160304055639/http://www.lse.ac.uk/aboutLSE/leagueTables/LSEinUniversityLeagueTables.aspx"                                                              
## [334] "#cite_ref-24"                                                                                                                                                                        
## [335] "http://www.hepi.ac.uk/wp-content/uploads/2016/12/Hepi_International-university-rankings-For-good-or-for-ill-REPORT-89-10_12_16_Screen.pdf"                                           
## [336] "https://web.archive.org/web/20170215055236/http://www.hepi.ac.uk/wp-content/uploads/2016/12/Hepi_International-university-rankings-For-good-or-for-ill-REPORT-89-10_12_16_Screen.pdf"
## [337] "#cite_ref-25"                                                                                                                                                                        
## [338] "http://www.universityrankings.ch/institutions/countries?c=United+Kingdom"                                                                                                            
## [339] "https://web.archive.org/web/20180220092348/http://www.universityrankings.ch/institutions/countries?c=United+Kingdom"                                                                 
## [340] "/wiki/Category:CS1_maint:_numeric_names:_authors_list"                                                                                                                               
## [341] "#cite_ref-QS_World_University_Rankings_2020_26-0"                                                                                                                                    
## [342] "https://www.topuniversities.com/university-rankings/world-university-rankings/2020"                                                                                                  
## [343] "#cite_ref-27"                                                                                                                                                                        
## [344] "https://www.timeshighereducation.com/world-university-rankings/2020/world-ranking#!/page/0/length/-1/locations/GB/sort_by/rank/sort_order/asc/cols/stats"                            
## [345] "#cite_ref-ARWU_2019_28-0"                                                                                                                                                            
## [346] "http://www.shanghairanking.com/World-University-Rankings-2019/UK.html"                                                                                                               
## [347] "#cite_ref-CWTS_Leiden_Ranking_29-0"                                                                                                                                                  
## [348] "https://www.leidenranking.com/ranking/2019/list"                                                                                                                                     
## [349] "#cite_ref-autogenerated2_30-0"                                                                                                                                                       
## [350] "#cite_ref-autogenerated2_30-1"                                                                                                                                                       
## [351] "http://reporter.leeds.ac.uk/485/s7.htm"                                                                                                                                              
## [352] "https://web.archive.org/web/20160304023545/http://reporter.leeds.ac.uk/485/s7.htm"                                                                                                   
## [353] "#cite_ref-31"                                                                                                                                                                        
## [354] "https://web.archive.org/web/20151217144035/http://datanotpropaganda.net/"                                                                                                            
## [355] "http://datanotpropaganda.net/"                                                                                                                                                       
## [356] "#cite_ref-32"                                                                                                                                                                        
## [357] "http://education.guardian.co.uk/higher/news/story/0,,2061015,00.html"                                                                                                                
## [358] "https://web.archive.org/web/20080721222723/http://education.guardian.co.uk/higher/news/story/0,,2061015,00.html"                                                                     
## [359] "#cite_ref-33"                                                                                                                                                                        
## [360] "http://education.guardian.co.uk/higher/comment/story/0,,2053187,00.html"                                                                                                             
## [361] "https://web.archive.org/web/20080721205649/http://education.guardian.co.uk/higher/comment/story/0,,2053187,00.html"                                                                  
## [362] "#cite_ref-34"                                                                                                                                                                        
## [363] "http://education.guardian.co.uk/higher/comment/story/0,,2063699,00.html"                                                                                                             
## [364] "https://web.archive.org/web/20080721101929/http://education.guardian.co.uk/higher/comment/story/0,,2063699,00.html"                                                                  
## [365] "#cite_ref-35"                                                                                                                                                                        
## [366] "http://www.timeshighereducation.co.uk/Journals/THE/THE/18_December_2008/attachments/RAE2008_THE_RESULTS.pdf"                                                                         
## [367] "https://web.archive.org/web/20120820030800/http://www.timeshighereducation.co.uk/Journals/THE/THE/18_December_2008/attachments/RAE2008_THE_RESULTS.pdf"                              
## [368] "#cite_ref-36"                                                                                                                                                                        
## [369] "https://www.theguardian.com/education/table/2008/dec/18/rae-2008-education"                                                                                                          
## [370] "https://web.archive.org/web/20170510232435/https://www.theguardian.com/education/table/2008/dec/18/rae-2008-education"                                                               
## [371] "#cite_ref-37"                                                                                                                                                                        
## [372] "http://www.timeshighereducation.co.uk/Journals/THE/THE/18_December_2008/attachments/RAE2008_THE_RESULTS.pdf"                                                                         
## [373] "https://web.archive.org/web/20120820030800/http://www.timeshighereducation.co.uk/Journals/THE/THE/18_December_2008/attachments/RAE2008_THE_RESULTS.pdf"                              
## [374] "#cite_ref-38"                                                                                                                                                                        
## [375] "http://news.bbc.co.uk/1/hi/education/8187742.stm"                                                                                                                                    
## [376] "https://web.archive.org/web/20120313125454/http://news.bbc.co.uk/1/hi/education/8187742.stm"                                                                                         
## [377] "#cite_ref-39"                                                                                                                                                                        
## [378] "http://www.bbk.ac.uk/news/league-tables/"                                                                                                                                            
## [379] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit&section=12"                                                                                            
## [380] "http://www.thecompleteuniversityguide.co.uk/league-tables/rankings"                                                                                                                  
## [381] "https://www.theguardian.com/education/universityguide"                                                                                                                               
## [382] "http://www.thesundaytimes.co.uk/sto/University_Guide/"                                                                                                                               
## [383] "http://www.universityrankings.ch/institutions/countries?c=United+Kingdom"                                                                                                            
## [384] "/wiki/Template:University_ranking_systems"                                                                                                                                           
## [385] "/wiki/Template_talk:University_ranking_systems"                                                                                                                                      
## [386] "https://en.wikipedia.org/w/index.php?title=Template:University_ranking_systems&action=edit"                                                                                          
## [387] "/wiki/College_and_university_rankings"                                                                                                                                               
## [388] "/wiki/Academic_Ranking_of_World_Universities"                                                                                                                                        
## [389] "/wiki/Center_for_World_University_Rankings"                                                                                                                                          
## [390] "/wiki/CWTS_Leiden_Ranking"                                                                                                                                                           
## [391] "/wiki/College_and_university_rankings#Global_University_Ranking"                                                                                                                     
## [392] "/wiki/Mines_ParisTech:_Professional_Ranking_of_World_Universities"                                                                                                                   
## [393] "/wiki/Performance_Ranking_of_Scientific_Papers_for_World_Universities"                                                                                                               
## [394] "/wiki/QS_World_University_Rankings"                                                                                                                                                  
## [395] "/wiki/Round_University_Ranking"                                                                                                                                                      
## [396] "/wiki/SCImago_Institutions_Rankings"                                                                                                                                                 
## [397] "/wiki/Times_Higher_Education_World_University_Rankings"                                                                                                                              
## [398] "/wiki/University_Ranking_by_Academic_Performance"                                                                                                                                    
## [399] "/wiki/U.S._News_%26_World_Report_Best_Global_University_Ranking"                                                                                                                     
## [400] "/wiki/Webometrics_Ranking_of_World_Universities"                                                                                                                                     
## [401] "/wiki/College_and_university_rankings#World's_Universities_with_Real_Impact"                                                                                                         
## [402] "/wiki/College_and_university_rankings#European_Union"                                                                                                                                
## [403] "/wiki/Rankings_of_universities_in_Latin_America"                                                                                                                                     
## [404] "/wiki/Rankings_of_universities_in_South_East_Asia"                                                                                                                                   
## [405] "/wiki/List_of_universities_in_Australia#Rankings_of_universities"                                                                                                                    
## [406] "/wiki/Excellence_in_Research_for_Australia"                                                                                                                                          
## [407] "/wiki/Rankings_of_universities_in_Brazil"                                                                                                                                            
## [408] "/wiki/Rankings_of_universities_in_Canada"                                                                                                                                            
## [409] "/wiki/Maclean%27s#Guide_to_Canadian_Universities"                                                                                                                                    
## [410] "/wiki/College_and_university_rankings#China"                                                                                                                                         
## [411] "/wiki/Chinese_university_ranking_(BCUR)"                                                                                                                                             
## [412] "/wiki/Chinese_university_ranking_(Wu_Shulian)"                                                                                                                                       
## [413] "/wiki/Chinese_university_ranking_(CUAA)"                                                                                                                                             
## [414] "/wiki/Chinese_university_ranking_(Netbig)"                                                                                                                                           
## [415] "/wiki/College_and_university_rankings#Germany"                                                                                                                                       
## [416] "/wiki/CHE_University_Ranking"                                                                                                                                                        
## [417] "/wiki/National_Institutional_Ranking_Framework"                                                                                                                                      
## [418] "/wiki/College_and_university_rankings#Japan"                                                                                                                                         
## [419] "/wiki/Going_broke_universities_%E2%80%93_Disappearing_universities"                                                                                                                  
## [420] "/wiki/Truly_Strong_Universities"                                                                                                                                                     
## [421] "/wiki/Academic_rankings_of_universities_in_Mexico"                                                                                                                                   
## [422] "/wiki/College_and_university_rankings#Mexico"                                                                                                                                        
## [423] "/wiki/Rankings_of_universities_in_Pakistan"                                                                                                                                          
## [424] "/wiki/College_and_university_rankings#Russian_Federation"                                                                                                                            
## [425] "/wiki/Rankings_of_universities_in_South_Africa"                                                                                                                                      
## [426] NA                                                                                                                                                                                    
## [427] "/wiki/Rankings_of_universities_in_the_United_States"                                                                                                                                 
## [428] "/wiki/Center_for_Measuring_University_Performance"                                                                                                                                   
## [429] "/wiki/Faculty_Scholarly_Productivity_Index"                                                                                                                                          
## [430] "/wiki/Forbes_Magazine%27s_List_of_America%27s_Best_Colleges"                                                                                                                         
## [431] "/wiki/The_Princeton_Review#College_admissions"                                                                                                                                       
## [432] "/wiki/U.S._News_%26_World_Report_Best_Colleges_Ranking"                                                                                                                              
## [433] "/wiki/Washington_Monthly#College_rankings"                                                                                                                                           
## [434] "/wiki/What_Will_They_Learn%3F"                                                                                                                                                       
## [435] "/wiki/Criticism_of_college_and_university_rankings_(North_America)"                                                                                                                  
## [436] "/wiki/Criticism_of_college_and_university_rankings_(2007_United_States)"                                                                                                             
## [437] "/wiki/Category:University_and_college_rankings"                                                                                                                                      
## [438] "/wiki/Template:Universities_in_the_United_Kingdom"                                                                                                                                   
## [439] "/wiki/Template_talk:Universities_in_the_United_Kingdom"                                                                                                                              
## [440] "https://en.wikipedia.org/w/index.php?title=Template:Universities_in_the_United_Kingdom&action=edit"                                                                                  
## [441] "/wiki/Universities_in_the_United_Kingdom"                                                                                                                                            
## [442] "/wiki/List_of_universities_in_England"                                                                                                                                               
## [443] "/wiki/Anglia_Ruskin_University"                                                                                                                                                      
## [444] "/wiki/University_of_Cambridge"                                                                                                                                                       
## [445] "/wiki/University_of_East_Anglia"                                                                                                                                                     
## [446] "/wiki/Norwich_University_of_the_Arts"                                                                                                                                                
## [447] "/wiki/University_of_Suffolk"                                                                                                                                                         
## [448] "/wiki/List_of_universities_and_higher_education_colleges_in_London"                                                                                                                  
## [449] "/wiki/University_of_London"                                                                                                                                                          
## [450] "/wiki/Birkbeck,_University_of_London"                                                                                                                                                
## [451] "/wiki/City,_University_of_London"                                                                                                                                                    
## [452] "/wiki/Courtauld_Institute_of_Art"                                                                                                                                                    
## [453] "/wiki/Goldsmiths,_University_of_London"                                                                                                                                              
## [454] "/wiki/Institute_of_Cancer_Research"                                                                                                                                                  
## [455] "/wiki/King%27s_College_London"                                                                                                                                                       
## [456] "/wiki/London_Business_School"                                                                                                                                                        
## [457] "/wiki/London_School_of_Economics"                                                                                                                                                    
## [458] "/wiki/London_School_of_Hygiene_%26_Tropical_Medicine"                                                                                                                                
## [459] "/wiki/Queen_Mary_University_of_London"                                                                                                                                               
## [460] "/wiki/Royal_Academy_of_Music"                                                                                                                                                        
## [461] "/wiki/Royal_Central_School_of_Speech_and_Drama"                                                                                                                                      
## [462] "/wiki/Royal_Holloway,_University_of_London"                                                                                                                                          
## [463] "/wiki/Royal_Veterinary_College"                                                                                                                                                      
## [464] "/wiki/School_of_Advanced_Study"                                                                                                                                                      
## [465] "/wiki/St_George%27s,_University_of_London"                                                                                                                                           
## [466] "/wiki/SOAS_University_of_London"                                                                                                                                                     
## [467] "/wiki/University_College_London"                                                                                                                                                     
## [468] "/wiki/Brunel_University_London"                                                                                                                                                      
## [469] "/wiki/University_of_East_London"                                                                                                                                                     
## [470] "/wiki/University_of_Greenwich"                                                                                                                                                       
## [471] "/wiki/Imperial_College_London"                                                                                                                                                       
## [472] "/wiki/Kingston_University"                                                                                                                                                           
## [473] "/wiki/London_Metropolitan_University"                                                                                                                                                
## [474] "/wiki/London_South_Bank_University"                                                                                                                                                  
## [475] "/wiki/Middlesex_University"                                                                                                                                                          
## [476] "/wiki/Ravensbourne_University_London"                                                                                                                                                
## [477] "/wiki/Regent%27s_University_London"                                                                                                                                                  
## [478] "/wiki/Richmond,_The_American_International_University_in_London"                                                                                                                     
## [479] "/wiki/Royal_College_of_Art"                                                                                                                                                          
## [480] "/wiki/Royal_College_of_Music"                                                                                                                                                        
## [481] "/wiki/University_of_Roehampton"                                                                                                                                                      
## [482] "/wiki/St_Mary%27s_University,_Twickenham"                                                                                                                                            
## [483] "/wiki/University_of_the_Arts_London"                                                                                                                                                 
## [484] "/wiki/University_of_Westminster"                                                                                                                                                     
## [485] "/wiki/University_of_West_London"                                                                                                                                                     
## [486] "/wiki/Aston_University"                                                                                                                                                              
## [487] "/wiki/University_of_Birmingham"                                                                                                                                                      
## [488] "/wiki/Birmingham_City_University"                                                                                                                                                    
## [489] "/wiki/Bishop_Grosseteste_University"                                                                                                                                                 
## [490] "/wiki/Coventry_University"                                                                                                                                                           
## [491] "/wiki/De_Montfort_University"                                                                                                                                                        
## [492] "/wiki/University_of_Derby"                                                                                                                                                           
## [493] "/wiki/Harper_Adams_University"                                                                                                                                                       
## [494] "/wiki/Keele_University"                                                                                                                                                              
## [495] "/wiki/University_of_Leicester"                                                                                                                                                       
## [496] "/wiki/University_of_Lincoln"                                                                                                                                                         
## [497] "/wiki/Loughborough_University"                                                                                                                                                       
## [498] "/wiki/Newman_University,_Birmingham"                                                                                                                                                 
## [499] "/wiki/University_of_Northampton"                                                                                                                                                     
## [500] "/wiki/University_of_Nottingham"                                                                                                                                                      
## [501] "/wiki/Nottingham_Trent_University"                                                                                                                                                   
## [502] "/wiki/Staffordshire_University"                                                                                                                                                      
## [503] "/wiki/University_College_Birmingham"                                                                                                                                                 
## [504] "/wiki/University_of_Warwick"                                                                                                                                                         
## [505] "/wiki/University_of_Wolverhampton"                                                                                                                                                   
## [506] "/wiki/University_of_Worcester"                                                                                                                                                       
## [507] "/wiki/University_of_Bolton"                                                                                                                                                          
## [508] "/wiki/University_of_Bradford"                                                                                                                                                        
## [509] "/wiki/University_of_Central_Lancashire"                                                                                                                                              
## [510] "/wiki/University_of_Chester"                                                                                                                                                         
## [511] "/wiki/University_of_Cumbria"                                                                                                                                                         
## [512] "/wiki/Durham_University"                                                                                                                                                             
## [513] "/wiki/Edge_Hill_University"                                                                                                                                                          
## [514] "/wiki/University_of_Huddersfield"                                                                                                                                                    
## [515] "/wiki/University_of_Hull"                                                                                                                                                            
## [516] "/wiki/Lancaster_University"                                                                                                                                                          
## [517] "/wiki/University_of_Leeds"                                                                                                                                                           
## [518] "/wiki/Leeds_Arts_University"                                                                                                                                                         
## [519] "/wiki/Leeds_Beckett_University"                                                                                                                                                      
## [520] "/wiki/Leeds_Trinity_University"                                                                                                                                                      
## [521] "/wiki/University_of_Liverpool"                                                                                                                                                       
## [522] "/wiki/Liverpool_Hope_University"                                                                                                                                                     
## [523] "/wiki/Liverpool_John_Moores_University"                                                                                                                                              
## [524] "/wiki/Liverpool_School_of_Tropical_Medicine"                                                                                                                                         
## [525] "/wiki/University_of_Manchester"                                                                                                                                                      
## [526] "/wiki/Manchester_Metropolitan_University"                                                                                                                                            
## [527] "/wiki/Newcastle_University"                                                                                                                                                          
## [528] "/wiki/Northumbria_University"                                                                                                                                                        
## [529] "/wiki/University_of_Salford"                                                                                                                                                         
## [530] "/wiki/University_of_Sheffield"                                                                                                                                                       
## [531] "/wiki/Sheffield_Hallam_University"                                                                                                                                                   
## [532] "/wiki/University_of_Sunderland"                                                                                                                                                      
## [533] "/wiki/Teesside_University"                                                                                                                                                           
## [534] "/wiki/University_of_York"                                                                                                                                                            
## [535] "/wiki/York_St_John_University"                                                                                                                                                       
## [536] "/wiki/Arts_University_Bournemouth"                                                                                                                                                   
## [537] "/wiki/University_of_Bath"                                                                                                                                                            
## [538] "/wiki/Bath_Spa_University"                                                                                                                                                           
## [539] "/wiki/University_of_Bedfordshire"                                                                                                                                                    
## [540] "/wiki/Bournemouth_University"                                                                                                                                                        
## [541] "/wiki/University_of_Brighton"                                                                                                                                                        
## [542] "/wiki/University_of_Bristol"                                                                                                                                                         
## [543] "/wiki/University_of_Buckingham"                                                                                                                                                      
## [544] "/wiki/Buckinghamshire_New_University"                                                                                                                                                
## [545] "/wiki/Canterbury_Christ_Church_University"                                                                                                                                           
## [546] "/wiki/University_of_Chichester"                                                                                                                                                      
## [547] "/wiki/Cranfield_University"                                                                                                                                                          
## [548] "/wiki/University_for_the_Creative_Arts"                                                                                                                                              
## [549] "/wiki/University_of_Essex"                                                                                                                                                           
## [550] "/wiki/University_of_Exeter"                                                                                                                                                          
## [551] "/wiki/Falmouth_University"                                                                                                                                                           
## [552] "/wiki/University_of_Gloucestershire"                                                                                                                                                 
## [553] "/wiki/University_of_Hertfordshire"                                                                                                                                                   
## [554] "/wiki/University_of_Kent"                                                                                                                                                            
## [555] "/wiki/University_of_Oxford"                                                                                                                                                          
## [556] "/wiki/Oxford_Brookes_University"                                                                                                                                                     
## [557] "/wiki/University_of_Plymouth"                                                                                                                                                        
## [558] "/wiki/University_of_Portsmouth"                                                                                                                                                      
## [559] "/wiki/University_of_Reading"                                                                                                                                                         
## [560] "/wiki/Royal_Agricultural_University"                                                                                                                                                 
## [561] "/wiki/University_of_St_Mark_%26_St_John"                                                                                                                                             
## [562] "/wiki/Solent_University"                                                                                                                                                             
## [563] "/wiki/University_of_Southampton"                                                                                                                                                     
## [564] "/wiki/University_of_Surrey"                                                                                                                                                          
## [565] "/wiki/University_of_Sussex"                                                                                                                                                          
## [566] "/wiki/University_of_the_West_of_England,_Bristol"                                                                                                                                    
## [567] "/wiki/University_of_Winchester"                                                                                                                                                      
## [568] "/wiki/List_of_universities_in_Northern_Ireland"                                                                                                                                      
## [569] "/wiki/Queen%27s_University_Belfast"                                                                                                                                                  
## [570] "/wiki/Ulster_University"                                                                                                                                                             
## [571] "/wiki/List_of_universities_in_Scotland"                                                                                                                                              
## [572] "/wiki/University_of_Aberdeen"                                                                                                                                                        
## [573] "/wiki/Abertay_University"                                                                                                                                                            
## [574] "/wiki/University_of_Dundee"                                                                                                                                                          
## [575] "/wiki/University_of_Edinburgh"                                                                                                                                                       
## [576] "/wiki/Edinburgh_Napier_University"                                                                                                                                                   
## [577] "/wiki/University_of_Glasgow"                                                                                                                                                         
## [578] "/wiki/Glasgow_Caledonian_University"                                                                                                                                                 
## [579] "/wiki/Heriot-Watt_University"                                                                                                                                                        
## [580] "/wiki/University_of_the_Highlands_and_Islands"                                                                                                                                       
## [581] "/wiki/Queen_Margaret_University"                                                                                                                                                     
## [582] "/wiki/Robert_Gordon_University"                                                                                                                                                      
## [583] "/wiki/Royal_Conservatoire_of_Scotland"                                                                                                                                               
## [584] "/wiki/University_of_St_Andrews"                                                                                                                                                      
## [585] "/wiki/University_of_Stirling"                                                                                                                                                        
## [586] "/wiki/University_of_Strathclyde"                                                                                                                                                     
## [587] "/wiki/University_of_the_West_of_Scotland"                                                                                                                                            
## [588] "/wiki/List_of_universities_in_Wales"                                                                                                                                                 
## [589] "/wiki/Aberystwyth_University"                                                                                                                                                        
## [590] "/wiki/Bangor_University"                                                                                                                                                             
## [591] "/wiki/Cardiff_University"                                                                                                                                                            
## [592] "/wiki/Cardiff_Metropolitan_University"                                                                                                                                               
## [593] "/wiki/University_of_South_Wales"                                                                                                                                                     
## [594] "/wiki/Swansea_University"                                                                                                                                                            
## [595] "/wiki/University_of_Wales_Trinity_Saint_David"                                                                                                                                       
## [596] "/wiki/Wrexham_Glynd%C5%B5r_University"                                                                                                                                               
## [597] "/wiki/List_of_universities_in_the_United_Kingdom#Universities_in_British_overseas_territories"                                                                                       
## [598] "/wiki/Bermuda_College"                                                                                                                                                               
## [599] "/wiki/Cayman_Islands_Law_School"                                                                                                                                                     
## [600] "/wiki/International_College_of_the_Cayman_Islands"                                                                                                                                   
## [601] "/wiki/Saint_James_School_of_Medicine"                                                                                                                                                
## [602] "/wiki/St._Matthew%27s_University"                                                                                                                                                    
## [603] "/wiki/University_of_Gibraltar"                                                                                                                                                       
## [604] "/wiki/University_College_of_the_Cayman_Islands"                                                                                                                                      
## [605] "/wiki/University_of_Science,_Arts_and_Technology"                                                                                                                                    
## [606] "/wiki/University_of_the_West_Indies_Open_Campus"                                                                                                                                     
## [607] "/wiki/List_of_universities_in_the_United_Kingdom#Universities_in_Crown_Dependencies"                                                                                                 
## [608] "/wiki/University_of_the_Channel_Islands_in_Guernsey"                                                                                                                                 
## [609] "/wiki/Arden_University"                                                                                                                                                              
## [610] "/wiki/BPP_University"                                                                                                                                                                
## [611] "/wiki/University_of_Law"                                                                                                                                                             
## [612] "/wiki/University_of_London_International_Programmes"                                                                                                                                 
## [613] "/wiki/Open_University"                                                                                                                                                               
## [614] "/wiki/List_of_UK_universities_by_date_of_foundation"                                                                                                                                 
## [615] "/wiki/Third-oldest_university_in_England_debate"                                                                                                                                     
## [616] "/wiki/List_of_UK_universities_by_endowment"                                                                                                                                          
## [617] "/wiki/List_of_universities_in_the_United_Kingdom_by_enrolment"                                                                                                                       
## [618] "/wiki/Colleges_within_universities_in_the_United_Kingdom"                                                                                                                            
## [619] "/wiki/British_degree_abbreviations"                                                                                                                                                  
## [620] "/wiki/National_Union_of_Students_(United_Kingdom)"                                                                                                                                   
## [621] NA                                                                                                                                                                                    
## [622] "/wiki/British_undergraduate_degree_classification"                                                                                                                                   
## [623] "/wiki/UCAS"                                                                                                                                                                          
## [624] "/wiki/Higher_Education_Funding_Council_for_England"                                                                                                                                  
## [625] "/wiki/Scottish_Funding_Council"                                                                                                                                                      
## [626] "/wiki/Category:Universities_in_the_United_Kingdom"                                                                                                                                   
## [627] "https://commons.wikimedia.org/wiki/Category:Universities_and_colleges_in_the_United_Kingdom"                                                                                         
## [628] "/wiki/List_of_universities_in_the_United_Kingdom"                                                                                                                                    
## [629] "https://en.wikipedia.org/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&oldid=993777449"                                                                           
## [630] "/wiki/Help:Category"                                                                                                                                                                 
## [631] "/wiki/Category:University_and_college_rankings"                                                                                                                                      
## [632] "/wiki/Category:Universities_in_the_United_Kingdom"                                                                                                                                   
## [633] "/wiki/Category:Organizations_established_in_1992"                                                                                                                                    
## [634] "/wiki/Category:CS1_maint:_numeric_names:_authors_list"                                                                                                                               
## [635] "/wiki/Category:Articles_with_short_description"                                                                                                                                      
## [636] "/wiki/Category:Short_description_matches_Wikidata"                                                                                                                                   
## [637] "/wiki/Category:EngvarB_from_November_2017"                                                                                                                                           
## [638] "/wiki/Category:Use_dmy_dates_from_November_2017"                                                                                                                                     
## [639] "/wiki/Category:Pages_with_login_required_references_or_sources"                                                                                                                      
## [640] "/wiki/Special:MyTalk"                                                                                                                                                                
## [641] "/wiki/Special:MyContributions"                                                                                                                                                       
## [642] "/w/index.php?title=Special:CreateAccount&returnto=Rankings+of+universities+in+the+United+Kingdom"                                                                                    
## [643] "/w/index.php?title=Special:UserLogin&returnto=Rankings+of+universities+in+the+United+Kingdom"                                                                                        
## [644] "/wiki/Rankings_of_universities_in_the_United_Kingdom"                                                                                                                                
## [645] "/wiki/Talk:Rankings_of_universities_in_the_United_Kingdom"                                                                                                                           
## [646] "/wiki/Rankings_of_universities_in_the_United_Kingdom"                                                                                                                                
## [647] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=edit"                                                                                                       
## [648] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=history"                                                                                                    
## [649] "/wiki/Main_Page"                                                                                                                                                                     
## [650] "/wiki/Main_Page"                                                                                                                                                                     
## [651] "/wiki/Wikipedia:Contents"                                                                                                                                                            
## [652] "/wiki/Portal:Current_events"                                                                                                                                                         
## [653] "/wiki/Special:Random"                                                                                                                                                                
## [654] "/wiki/Wikipedia:About"                                                                                                                                                               
## [655] "//en.wikipedia.org/wiki/Wikipedia:Contact_us"                                                                                                                                        
## [656] "https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"                                    
## [657] "/wiki/Help:Contents"                                                                                                                                                                 
## [658] "/wiki/Help:Introduction"                                                                                                                                                             
## [659] "/wiki/Wikipedia:Community_portal"                                                                                                                                                    
## [660] "/wiki/Special:RecentChanges"                                                                                                                                                         
## [661] "/wiki/Wikipedia:File_Upload_Wizard"                                                                                                                                                  
## [662] "/wiki/Special:WhatLinksHere/Rankings_of_universities_in_the_United_Kingdom"                                                                                                          
## [663] "/wiki/Special:RecentChangesLinked/Rankings_of_universities_in_the_United_Kingdom"                                                                                                    
## [664] "/wiki/Wikipedia:File_Upload_Wizard"                                                                                                                                                  
## [665] "/wiki/Special:SpecialPages"                                                                                                                                                          
## [666] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&oldid=993777449"                                                                                                   
## [667] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&action=info"                                                                                                       
## [668] "/w/index.php?title=Special:CiteThisPage&page=Rankings_of_universities_in_the_United_Kingdom&id=993777449&wpFormIdentifier=titleform"                                                 
## [669] "https://www.wikidata.org/wiki/Special:EntityPage/Q7293303"                                                                                                                           
## [670] "/w/index.php?title=Special:DownloadAsPdf&page=Rankings_of_universities_in_the_United_Kingdom&action=show-download-screen"                                                            
## [671] "/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&printable=yes"                                                                                                     
## [672] "https://www.wikidata.org/wiki/Special:EntityPage/Q7293303#sitelinks-wikipedia"                                                                                                       
## [673] "//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"                                                                              
## [674] "//creativecommons.org/licenses/by-sa/3.0/"                                                                                                                                           
## [675] "//foundation.wikimedia.org/wiki/Terms_of_Use"                                                                                                                                        
## [676] "//foundation.wikimedia.org/wiki/Privacy_policy"                                                                                                                                      
## [677] "//www.wikimediafoundation.org/"                                                                                                                                                      
## [678] "https://foundation.wikimedia.org/wiki/Privacy_policy"                                                                                                                                
## [679] "/wiki/Wikipedia:About"                                                                                                                                                               
## [680] "/wiki/Wikipedia:General_disclaimer"                                                                                                                                                  
## [681] "//en.wikipedia.org/wiki/Wikipedia:Contact_us"                                                                                                                                        
## [682] "//en.m.wikipedia.org/w/index.php?title=Rankings_of_universities_in_the_United_Kingdom&mobileaction=toggle_view_mobile"                                                               
## [683] "https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute"                                                                                                                 
## [684] "https://stats.wikimedia.org/#/en.wikipedia.org"                                                                                                                                      
## [685] "https://foundation.wikimedia.org/wiki/Cookie_statement"                                                                                                                              
## [686] "https://wikimediafoundation.org/"                                                                                                                                                    
## [687] "https://www.mediawiki.org/"

Step 5

or the tables

tables <- read_html(url) %>% 
          html_nodes("table") 
tables
## {xml_nodeset (9)}
## [1] <table class="wikitable" style="text-align:center"><tbody>\n<tr>\n<th>Ran ...
## [2] <table class="wikitable sortable" style="text-align:center"><tbody>\n<tr> ...
## [3] <table class="wikitable" style="text-align:center"><tbody>\n<tr>\n<th>Ran ...
## [4] <table class="wikitable sortable" style="text-align: left;"><tbody>\n<tr> ...
## [5] <table class="wikitable sortable" style="text-align: left;"><tbody>\n<tr> ...
## [6] <table class="nowraplinks mw-collapsible mw-collapsed navbox-inner" style ...
## [7] <table class="nowraplinks hlist mw-collapsible mw-collapsed navbox-inner" ...
## [8] <table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbod ...
## [9] <table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbod ...

Step 6 - Extract the first table

ranking <- read_html(url)  %>% 
            html_nodes("table") %>% `[[`(1) %>% 
            html_table(fill = TRUE)

Take Home Messages

  • Web scraping is quite straightforward
  • It needs a bit a practice but many resources are available online
  • Give it a try!